package com.bank.basic.controller;

import com.bank.basic.service.StandardService;
import com.bank.model.entity.Standard;
import com.bank.model.vo.standard.StandardVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author callumEm
 * @version 1.0
 * @create 2023/4/19 15:34
 */
@RestController
@RequestMapping(value = "/basic/standard")
public class StandardController {
    @Autowired
    StandardService standardService;

    @GetMapping("/all")
    List<Standard> queryStandard(){
        return standardService.queryStandardService();
    }
    @PostMapping("/update")
    void updateStandard(@RequestBody Standard standard){
        standardService.updateStandardService(standard);
    }
    @PostMapping("/add")
    void addStandard(@RequestBody StandardVo standardVo){
        standardService.addStandardService(standardVo);
    }
}
